/*******************************************************************************
* File Name: Interrupts.h
*
* Version 1.0
*
*  Description: This file provides prototype for all the external interrupt 
*               service routines present in the project
*
********************************************************************************
* Copyright (2015), Cypress Semiconductor Corporation.
********************************************************************************
* This software is owned by Cypress Semiconductor Corporation (Cypress) and is
* protected by and subject to worldwide patent protection (United States and
* foreign), United States copyright laws and international treaty provisions.
* Cypress hereby grants to licensee a personal, non-exclusive, non-transferable
* license to copy, use, modify, create derivative works of, and compile the
* Cypress Source Code and derivative works for the sole purpose of creating
* custom software in support of licensee product to be used only in conjunction
* with a Cypress integrated circuit as specified in the applicable agreement.
* Any reproduction, modification, translation, compilation, or representation of
* this software except as specified above is prohibited without the express
* written permission of Cypress.
*
* Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
* REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* Cypress reserves the right to make changes without further notice to the
* materials described herein. Cypress does not assume any liability arising out
* of the application or use of any product or circuit described herein. Cypress
* does not authorize its products for use as critical components in life-support
* systems where a malfunction or failure may reasonably be expected to result in
* significant injury to the user. The inclusion of Cypress' product in a life-
* support systems application implies that the manufacturer assumes all risk of
* such use and in doing so indemnifies Cypress against all charges. Use may be
* limited by and subject to the applicable Cypress software license agreement.
*******************************************************************************/

#ifndef _INTERRUPTS_H_
#define _INTERRUPTS_H_ 

/*******************************************************************************
* Function Name: InDMADone_Interrupt
********************************************************************************
* Summary:
*   The Interrupt Service Routine for isr_InDMADone. Arms USB Audio In end-point
*     for USB host to receive audio data.
*
* Parameters:  
*    InDMADone interrupt vector
*
* Return:
*   None
*
* Theory:
*  USB EP will be loaded with data picked from the Circular buffer using InDMA
*
* Side Effects:
* Updates the circular buffer level.
*
*******************************************************************************/
CY_ISR_PROTO(InDMADone_Interrupt);

/*******************************************************************************
* Function Name: RxDMADone_Interrupt
********************************************************************************
* Summary:
*   The Interrupt Service Routine for isr_RxDMADone. This handles the AUDIO In
*    buffer pointers and detects overflow of the buffer to stop AUDIO In. 
*
* Parameters:  
*    RxDMADone interrupt vector
*
* Return:
*   void.
*
* Theory:
*  Whenever the data from Transmitter is recieved the buffer level will be increased by input transaction size
*
* Side Effects:
* Updates the circular buffer level.
* Updates the RXDMA Done flag, to inform that DMA is ready for trigger.
*
*******************************************************************************/
CY_ISR_PROTO(RxDMADone_Interrupt);

/*******************************************************************************
* Function Name: isr_RemoteWakeup
********************************************************************************
*
* Summary:
*  ISR Callback function for remote wakeup pin.
*
* Parameters:
*  None
*
* Return:
*  None
*
* Theory:
*  Device will wakeup when the trigger is set by BLE device and USB Host will be set to wakeup
*
* Side Effects:
*
* Note:
*
*******************************************************************************/
CY_ISR_PROTO(isr_RemoteWakeup);

/*******************************************************************************
* Function Name: isr_PktDecoder
********************************************************************************
*
* Summary:
*  Handles the Interrupt Service Routine for the UART Timer.
*  Resets RX command state m/c for every 100ms delay on RX byte
*  If RX packet has started, there should not be more than 100ms delay between 
*  each RX byte with-in the packet.
*
* Parameters:
*  void
*
* Return:
*  void
*
* Theory:
*  None
*
* Side Effects:
*  State m/c and other parameters will be reset
*
* Note:
*  This ISR can cause packet to be dropped by the decoder if there exist delay for bytes with-in the packet.
*******************************************************************************/
CY_ISR_PROTO(isr_PktDecoder);

#endif /*_INTERRUPTS_H_*/

/* [] END OF FILE */
